<!doctype html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<div th:replace="module/macros :: head"></div>

<body class="user-select">

<link rel="stylesheet" type="text/css" th:href="@{/plugins/toast/jquery.toast.css}">

<div th:replace="module/macros :: header(6)"></div>

<section class="container container-page">

    <div th:replace="admin/admin_module/admin_macros :: push(3)"></div>

    <div class="tile">
        <input type="hidden" id="articleId">
        <a thref="#"><span style="color:#5bc0de">赞助</span></a>
        <div class="table-responsive">
            <table class="table table-striped table-bordered table-hover" id="article_table">
                <tr>
                    <td>
                        <div class="tile">
                            <header class="article-header">
                                <h1 class="article-title">赞助审核</h1>
                            </header>
                            <div class="table-responsive">
                                <table class="table table-striped table-bordered table-hover">
                                    <tr>
                                        <td>用户名</td>
                                        <td>标题</td>
                                        <td>申请时间</td>
                                        <td>qq</td>
                                        <td>操作</td>
                                    </tr>
                                    <tr th:each="sponsor : ${info.list}">
                                        <td th:text="${sponsor.sponsorUserName}" class="mt-auto"></td>
                                        <td th:text="${sponsor.sponsorTitle}" class="mt-auto"></td>
                                        <td th:text="${#dates.format(sponsor.sponsorCreatetime,'yyyy/MM/dd HH:mm:ss')}"></td>
                                        <td th:text="${sponsor.qq}" class="mt-auto"></td>
                                        <td>
                                            <button th:onclick="'javascript:look('+${sponsor.sponsorId}+')'" class="btn-success button btn-sm ">查看</button>
                                            <button th:onclick="'javascript:adopt('+${sponsor.sponsorId}+')'" class="btn-success button btn-sm ">通过</button>
                                            <button th:onclick="'javascript:remove('+${sponsor.sponsorId}+')'" class="btn-danger button btn-sm">打回</button>
                                        </td>
                                    </tr>
                                    <tr th:unless="${info.list.total} != 0">
                                        <td th:attr="colspan='4',align='center'">暂无启示</td>
                                    </tr>
                                </table>
                                <div th:replace="module/macros :: pagePost(${info})"></div>
                            </div>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
    </div>

</section>

<div th:replace="module/macros :: footer"></div>


<div th:replace="module/macros :: footer_js"></div>
<div th:replace="module/macros :: photo_js"></div>
<script type="text/javascript" th:src="@{/js/mayday.js}"></script>
<script type="text/javascript" th:src="@{/plugins/toast/jquery.toast.js}"></script>

<script>


    function remove(sponsorId) {
        var r=confirm("确定打回吗!");
        if (r==true){
            window.location.href = "/admin/sponsor/repulse?sponsorId="+sponsorId;
        }
    }
    function adopt(sponsorId) {
        var r=confirm("确定通过吗!");
        if (r==true){
            window.location.href = "/admin/sponsor/adopt?sponsorId="+sponsorId;
        }
    }
    function look(sponsorId) {
        window.location.href = "/admin/sponsor/look?sponsorId="+sponsorId;
    }


</script>
</body>
</html>